#lang racket

(define (wage h price)
  (cond 
    [(> h 100) (error 'wage "The hour is too much!")]
    [else (* h price)])
  )

(define (hour->wages h-list price)
  (cond
    [(empty? h-list) empty]
    [else (cons (wage (first h-list) price)
                (hour->wages (rest h-list) price))]
    )
  )

; Test
(define a-worker-list
  (cons 40
    (cons 45
       (cons 50
         (cons 55
           (cons 100 empty))))))
(hour->wages a-worker-list 12)
